import axios,{url }from './index';
export  const axiosAjax = async (method, urlApi, data) => {
    if (method === 'get') {
        let res = await axios({
            method: method,
            url: url + urlApi,
            params: data
        });
        return res.data;
    }
    let res = await axios({
        method: method,
        url: url + urlApi,
        data
    });
    return res.data;
}